FROM alpine AS base
MAINTAINER marko.luksa@gmail.com

FROM golang:1.11-alpine AS build
WORKDIR /pkg
COPY ./pkg /pkg
RUN CGO_ENABLED=0 go build /pkg/website-controller.go

FROM base AS final
WORKDIR /pkg
COPY deployment-template.json .
COPY service-template.json .
COPY --from=build /pkg/website-controller .
CMD ["./website-controller"]